/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package entity;

import java.io.Serializable;
public class Media implements Serializable {
	public Media() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == entity.ORMConstants.KEY_MEDIA_MESSAGGIO) {
			return ORM_messaggio;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == entity.ORMConstants.KEY_MEDIA_ALBUM) {
			this.album = (entity.Album) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int ID;
	
	private entity.Album album;
	
	private String nome;
	
	private long data;
	
	private float dimensione;
	
	private String url;
	
	private String discriminator;
	
	private java.util.Set ORM_messaggio = new java.util.HashSet();
	
	private void setID(int value) {
		this.ID = value;
	}
	
	public int getID() {
		return ID;
	}
	
	public int getORMID() {
		return getID();
	}
	
	public void setNome(String value) {
		this.nome = value;
	}
	
	public String getNome() {
		return nome;
	}
	
	public void setData(long value) {
		this.data = value;
	}
	
	public long getData() {
		return data;
	}
	
	public void setDimensione(float value) {
		this.dimensione = value;
	}
	
	public float getDimensione() {
		return dimensione;
	}
	
	public void setUrl(String value) {
		this.url = value;
	}
	
	public String getUrl() {
		return url;
	}
	
	public void setDiscriminator(String value) {
		this.discriminator = value;
	}
	
	public String getDiscriminator() {
		return discriminator;
	}
	
	private void setORM_Messaggio(java.util.Set value) {
		this.ORM_messaggio = value;
	}
	
	private java.util.Set getORM_Messaggio() {
		return ORM_messaggio;
	}
	
	public final entity.MessaggioSetCollection messaggio = new entity.MessaggioSetCollection(this, _ormAdapter, entity.ORMConstants.KEY_MEDIA_MESSAGGIO, entity.ORMConstants.KEY_MESSAGGIO_MEDIA, entity.ORMConstants.KEY_MUL_MANY_TO_MANY);
	
	public void setAlbum(entity.Album value) {
		if (album != null) {
			album.media.remove(this);
		}
		if (value != null) {
			value.media.add(this);
		}
	}
	
	public entity.Album getAlbum() {
		return album;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Album(entity.Album value) {
		this.album = value;
	}
	
	private entity.Album getORM_Album() {
		return album;
	}
	
	public String toString() {
		return String.valueOf(getID());
	}
	
}
